package com.ldh.mod4j.businessdomain.generator.hibernate

import com.google.inject.Inject
import org.mod4j.dslcommon.generator.helpers.NameMapper
import org.mod4j.businessdomain.generator.helpers.BusinessClassHelpers
import org.mod4j.businessdomain.generator.helpers.BusinessDomainModelHelpers
import com.ldh.mod4j.businessdomain.businessDomainDsl.BusinessClass
import org.mod4j.dslcommon.xpand.java.JavaComments

class DaoImpl {
	@Inject extension JavaComments javaComments
	
	def daoImplementation(BusinessClass clazz)'''
«javaComments.extensionPointHeader("Mod4j BusinessDomainDsl generator: DaoImpl.xtend", clazz)»


package «NameMapper::getDaoImplPackage(BusinessDomainModelHelpers::getModel(clazz).name)»;
import «NameMapper::getFqnDaoInterface(BusinessDomainModelHelpers::getModel(clazz).name, clazz.name)»;

/**
 * «NameMapper::javaDomainClass(clazz.name)» Data Access Object implementation. Responsible for Creating,
 * Reading, Updating and Deleting «NameMapper::javaDomainClass(clazz.name)» objects in the database.
 * All database access is done here.
 *  
 * @author Initially generated by Mod4j
 */
public class «NameMapper::javaDaoClass(clazz.name)» extends «NameMapper::javaDaoBaseClass(clazz.name)»
	implements «NameMapper::javaDaoInterface(clazz.name)» {

}
	'''
}